package day03;

import java.util.Scanner;

public class IfElseIfDemo {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();

        if(n > 2000){
            n *= 0.5;
        }else if (n > 1000){
            n *= 0.7;
        }else if (n > 500){
            n *= 0.8;
        }else {
            n *= 0.9;
        }
        System.out.println(n);

    }

}
